# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1AabInfo do
  @moduledoc """
  Android App Bundle (AAB) information for a Firebase app.

  ## Attributes

  *   `integrationState` (*type:* `String.t`, *default:* `nil`) - App bundle integration state. Only valid for android apps.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the `AabInfo` resource. Format: `projects/{project_number}/apps/{app}/aabInfo`
  *   `testCertificate` (*type:* `GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1TestCertificate.t`, *default:* `nil`) - App bundle test certificate generated for the app. Set after the first app bundle is uploaded for this app.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :integrationState => String.t() | nil,
          :name => String.t() | nil,
          :testCertificate =>
            GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1TestCertificate.t()
            | nil
        }

  field(:integrationState)
  field(:name)

  field(:testCertificate,
    as: GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1TestCertificate
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1AabInfo do
  def decode(value, options) do
    GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1AabInfo.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.FirebaseAppDistribution.V1.Model.GoogleFirebaseAppdistroV1AabInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
